package tt.dz.egobus.servicemanager.business.distance;

import tt.dz.egobus.servicemanager.bean.IdAlgorithm;
import tt.dz.egobus.servicemanager.business.point.BusPoint;

import java.util.List;

/**
 * @author Anson
 * @date 17-3-23
 * @name 距离算法等服务
 * @see DistanceAlgorithm#bestQueue(PointFilter)
 * @since 1.0.2
 */
public interface DistanceAlgorithm extends IdAlgorithm {


    /**
     * @param busPoints 当前所有车连坐标队列
     * @author Anson
     * @date 17-3-23
     * @name
     * @since 1.0.2
     */
    void setBusPoint(List<BusPoint> busPoints);

    /**
     * @param x
     * @param y
     * @author Anson
     * @date 17-3-23
     * @name 设置当前的当前的坐标
     * @since 1.0.2
     */
    void setCurrentPoint(double x, double y);

    /**
     * @param queueLimit
     * @author Anson
     * @date 17-3-23
     * @name 设置最优队列的长度
     * @since 1.0.2
     */
    void setMaxQueueLimit(int queueLimit);

    /**
     * @param maxDistanceLimit
     * @author Anson
     * @date 17-3-23
     * @name 设置最大的搜索距离
     * @since 1.0.2
     */
    void setMaxDistanceLimit(double maxDistanceLimit);

    /**
     * @param pointFilter [非必须]额外的过滤条件,可以为null
     * @author Anson
     * @date 17-3-23
     * @name 最优队列
     * @since 1.0.2
     */
    BusPoint[] bestQueue(PointFilter pointFilter);

    /**
     * @param pointFilter [非必须]额外的过滤条件,可以为null
     * @author Anson
     * @date 17-3-23
     * @name 获取满足小于最大距离的点
     * @since 1.0.3
     */
    BusPoint[] getFilter(PointFilter pointFilter);


}
